from django.urls import path

from api import views
# from .views import vip, audio       
from . import wechat
from .controllers import audio, wechat, vip, feedback, upload, config, cleanup

urlpatterns = [
    # 微信相关接口
    # path('wechat/qrcode', wechat.wechat_qrcode, name='wechat_qrcode'),
    # path('wechat/check_login', wechat.check_login_status, name='check_login_status'),
    path('wechat/login', wechat.wechat_login, name='wechat_login'),
    path('wechat/user/info', wechat.wechat_user_info, name='wechat_user_info'),
    path('wechat/user/update', wechat.wechat_user_update, name='wechat_user_update'),
    path('wechat/customer_service/send', wechat.send_customer_service_message, name='send_customer_service_message'),
    # path('wechat/logout', wechat.wechat_logout, name='wechat_logout'),

    # 音频相关接口
    path('audio/create', views.audio_create, name='audio_create'),
    path('audio/upload', views.audio_upload, name='audio_upload'),
    path('audio/list', audio.audio_list, name='audio_list'),
    path('audio/delete/<int:audio_id>', audio.audio_delete, name='audio_delete'),

    # VIP相关接口
    path('vip/activate', vip.vip_activate, name='vip_activate'),
    path('vip/info', vip.vip_info, name='vip_info'),

    # 反馈相关路由
    path('feedback/create', feedback.feedback_create, name='feedback_create'),
    path('feedback/list', feedback.feedback_list, name='feedback_list'),
    path('feedback/<int:feedback_id>', feedback.feedback_detail, name='feedback_detail'),

    # 图片上传接口
    path('upload/image', upload.upload_image, name='upload_image'),

    path('audio/kokoro/synthesize', audio.kokoro_synthesize, name='kokoro_synthesize'),
    path('audio/kokoro/voices', audio.voices, name='voices'),

    # 配置相关接口
    path('config', config.get_config, name='get_config'),

    path('cleanup/audio', cleanup.cleanup_audio_files, name='cleanup_audio_files'),
] 